<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Module      :  Text.ParserCombinators.Parsec.Prim</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Copyright   :  (c) Paolo Martini 2007</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- License     :  BSD-style (see the LICENSE file)</span><span>
</span><span id="line-8"></span><span class="hs-comment">--</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Maintainer  :  derek.a.elkins@gmail.com</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Parsec compatibility module</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Text.ParserCombinators.Parsec.Prim</span><span>
</span><span id="line-18"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#%3C%3F%3E"><span class="hs-operator">(&lt;?&gt;)</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator">(&lt;|&gt;)</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>      </span><span class="annot"><a href="Text.Parsec.String.html#Parser"><span class="hs-identifier">Parser</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>      </span><span class="annot"><a href="Text.Parsec.String.html#GenParser"><span class="hs-identifier">GenParser</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>      </span><span class="annot"><a href="Text.ParserCombinators.Parsec.Prim.html#runParser"><span class="hs-identifier">runParser</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#parse"><span class="hs-identifier">parse</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>      </span><span class="annot"><a href="Text.Parsec.String.html#parseFromFile"><span class="hs-identifier">parseFromFile</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#parseTest"><span class="hs-identifier">parseTest</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#token"><span class="hs-identifier">token</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#tokens"><span class="hs-identifier">tokens</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#tokenPrim"><span class="hs-identifier">tokenPrim</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#tokenPrimEx"><span class="hs-identifier">tokenPrimEx</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>      </span><span class="annot"><a href="Text.ParserCombinators.Parsec.Prim.html#try"><span class="hs-identifier">try</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#label"><span class="hs-keyword">label</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#labels"><span class="hs-identifier">labels</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#unexpected"><span class="hs-identifier">unexpected</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>      </span><span class="annot"><a href="Text.ParserCombinators.Parsec.Prim.html#pzero"><span class="hs-identifier">pzero</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#many"><span class="hs-identifier">many</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#skipMany"><span class="hs-identifier">skipMany</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#getState"><span class="hs-identifier">getState</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#setState"><span class="hs-identifier">setState</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#updateState"><span class="hs-identifier">updateState</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#getPosition"><span class="hs-identifier">getPosition</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#setPosition"><span class="hs-identifier">setPosition</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#getInput"><span class="hs-identifier">getInput</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#setInput"><span class="hs-identifier">setInput</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#State"><span class="hs-identifier">State</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#getParserState"><span class="hs-identifier">getParserState</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>      </span><span class="annot"><a href="Text.Parsec.Prim.html#setParserState"><span class="hs-identifier">setParserState</span></a></span><span>
</span><span id="line-47"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html"><span class="hs-identifier">Text.Parsec.Prim</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#runParser"><span class="hs-identifier">runParser</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#try"><span class="hs-identifier">try</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html"><span class="hs-identifier">Text.Parsec.Prim</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">N</span></span><span> </span><span class="hs-comment">-- 'N' for 'New'</span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Text.Parsec.String.html"><span class="hs-identifier">Text.Parsec.String</span></a></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Text.Parsec.Error.html"><span class="hs-identifier">Text.Parsec.Error</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Text.Parsec.Pos.html"><span class="hs-identifier">Text.Parsec.Pos</span></a></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span id="local-6989586621679062577"><span id="local-6989586621679062578"><span id="local-6989586621679062579"><span class="annot"><a href="Text.ParserCombinators.Parsec.Prim.html#pzero"><span class="hs-identifier hs-type">pzero</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.Parsec.String.html#GenParser"><span class="hs-identifier hs-type">GenParser</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062579"><span class="hs-identifier hs-type">tok</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062578"><span class="hs-identifier hs-type">st</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062577"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-57"></span><span id="pzero"><span class="annot"><span class="annottext">pzero :: forall tok st a. GenParser tok st a
</span><a href="Text.ParserCombinators.Parsec.Prim.html#pzero"><span class="hs-identifier hs-var hs-var">pzero</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT [tok] st Identity a
forall s u (m :: * -&gt; *) a. ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#parserZero"><span class="hs-identifier hs-var">parserZero</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span id="local-6989586621679062564"><span id="local-6989586621679062565"><span id="local-6989586621679062566"><span class="annot"><a href="Text.ParserCombinators.Parsec.Prim.html#runParser"><span class="hs-identifier hs-type">runParser</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.Parsec.String.html#GenParser"><span class="hs-identifier hs-type">GenParser</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062566"><span class="hs-identifier hs-type">tok</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062565"><span class="hs-identifier hs-type">st</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062564"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-60"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679062565"><span class="hs-identifier hs-type">st</span></a></span><span>
</span><span id="line-61"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Pos.html#SourceName"><span class="hs-identifier hs-type">SourceName</span></a></span><span>
</span><span id="line-62"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679062566"><span class="hs-identifier hs-type">tok</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-63"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="Text.Parsec.Error.html#ParseError"><span class="hs-identifier hs-type">ParseError</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062564"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-64"></span><span id="runParser"><span class="annot"><span class="annottext">runParser :: forall tok st a.
GenParser tok st a
-&gt; st -&gt; SourceName -&gt; [tok] -&gt; Either ParseError a
</span><a href="Text.ParserCombinators.Parsec.Prim.html#runParser"><span class="hs-identifier hs-var hs-var">runParser</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Parsec [tok] st a
-&gt; st -&gt; SourceName -&gt; [tok] -&gt; Either ParseError a
forall s t u a.
Stream s Identity t =&gt;
Parsec s u a -&gt; u -&gt; SourceName -&gt; s -&gt; Either ParseError a
</span><a href="Text.Parsec.Prim.html#runParser"><span class="hs-identifier hs-var">N.runParser</span></a></span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span id="local-6989586621679062548"><span id="local-6989586621679062549"><span id="local-6989586621679062550"><span class="annot"><a href="Text.ParserCombinators.Parsec.Prim.html#try"><span class="hs-identifier hs-type">try</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.Parsec.String.html#GenParser"><span class="hs-identifier hs-type">GenParser</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062550"><span class="hs-identifier hs-type">tok</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062549"><span class="hs-identifier hs-type">st</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062548"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.String.html#GenParser"><span class="hs-identifier hs-type">GenParser</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062550"><span class="hs-identifier hs-type">tok</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062549"><span class="hs-identifier hs-type">st</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679062548"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-67"></span><span id="try"><span class="annot"><span class="annottext">try :: forall tok st a. GenParser tok st a -&gt; GenParser tok st a
</span><a href="Text.ParserCombinators.Parsec.Prim.html#try"><span class="hs-identifier hs-var hs-var">try</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT [tok] st Identity a -&gt; ParsecT [tok] st Identity a
forall s u (m :: * -&gt; *) a. ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#try"><span class="hs-identifier hs-var">N.try</span></a></span><span>
</span><span id="line-68"></span></pre></body></html>